//package com.chinasoft.maysham.manager.intercepter;
//
//import org.springframework.http.HttpStatus;
//import org.springframework.stereotype.Component;
//import org.springframework.util.StringUtils;
//import org.springframework.web.servlet.HandlerInterceptor;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//@Component
//public class IamInterceptor implements HandlerInterceptor {
//
//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        String tokenHeader = request.getHeader("access-token");
//        if (StringUtils.isEmpty(tokenHeader)) {
//            response.setStatus(HttpStatus.UNAUTHORIZED.value());
//            return false;
//        }
//        return true;
//    }
//}
